home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4761 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  48 lines

  1. Path: news.msn.com!news.compuserve.com
  2. From: ewl@panix.com (Emery Lapinski)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: timer
  5. Date: 6 Feb 1996 14:03:52 -0800
  6. Organization: Emery Lapinski, private citizen.
  7. Message-ID: <4f8j88$oib@panix2.panix.com>
  8. References: <311000C2.546DE888@applique.sedd.trw.com>
  9. NNTP-Posting-Host: panix2.panix.com
  10. X-Forged-Path: I do not want my posts going to compuserve or msn
  11. X-SpookFood: $200 million in gold bullion M4 Nazi Uzi
  12. X-ClamFood: [Hello to all my fans in wog surveillance] Power Leipold GREENE NOBODY@REPLAY.COM CARTO 4. ___________________
  13. X-CanterAndSiegel: Green Cards? Oxygenated Water? Hatred and disgust!
  14. X-Homepage: http://www.panix.com/~ewl/
  15. X-Lenny-Bruce: If you can't say 'fuck' you can't say 'fuck the government'
  16.  
  17. In article <311000C2.546DE888@applique.sedd.trw.com>,
  18. Ilan Tirer  <tireri@applique.sedd.trw.com> wrote:
  19. >Hi,
  20. >How would you setup a timer so every 1 minute I can perform some 
  21. >operation.
  22.  
  23.  
  24. I'd probably do the following:
  25.  
  26. #include <vport.h>
  27. #include vtimerHEADER
  28.  
  29. ...
  30.  
  31. vtimer *timer=vtimerCreate() ;
  32. vtimerSetPeriod(timer, 60, 0) ;
  33. vtimerSetRecurrent(timer) ;
  34. vtimerSetNotify(timer, vtimerNoteProcToPerformSomeFunction) ;
  35. vtimerStart(timer) ;
  36.  
  37. ...
  38.  
  39. but that probably won't work for you unless you're using the same libraries
  40. that I'm using.
  41.  
  42. -emery
  43. -- 
  44. ewl@panix.com | http://www.panix.com/~ewl | "You can have my useless cat(1) 
  45. when you pry it from my cold dead finger(1)." | This work is Copyright 1995 
  46. Emery Lapinski and is freely redistributable by anyone and anything with the 
  47. exception of Microsoft Network. | Telco Bill, make a run for the border.
  48.